/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package calculation;

import java.io.Serializable;
import javax.faces.bean.ManagedBean;
import javax.faces.bean.SessionScoped;

/**
 *
 * @author jzajaczek
 */
@ManagedBean(name="AllowanceBean")
@SessionScoped
public class AllowanceBean implements Serializable {
    private double c1 = 0.0;
    private double c2 = 0.0;
    private double c3 = 0.0;
    
    public String check() {
        if (this.getC1() + this.getC2() +this.getC3() < 0.0) {
            return "failure"; }
        else return "true";
    }

    /**
     * @return the c1
     */
    public double getC1() {
        return c1;
    }

    /**
     * @param c1 the c1 to set
     */
    public void setC1(double c1) {
        this.c1 = c1;
    }

    /**
     * @return the c2
     */
    public double getC2() {
        return c2;
    }

    /**
     * @param c2 the c2 to set
     */
    public void setC2(double c2) {
        this.c2 = c2;
    }

    /**
     * @return the c3
     */
    public double getC3() {
        return c3;
    }

    /**
     * @param c3 the c3 to set
     */
    public void setC3(double c3) {
        this.c3 = c3;
    }
    
    
}
